package com.goldgov.commylog.dao;

import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.goldgov.commylog.service.Commylog;
import com.goldgov.commylog.service.CommylogQuery;
import com.goldgov.commylog.service.StatisticsCommylogBean;
import com.goldgov.commylog.service.StatisticsCommylogQuery;

@Mapper
public interface CommylogDao{
	Commylog getCommylogID();
	
	void addCommylog(Commylog obj);
	
	int deleteCommylog(@Param("ids") String[] ids);
	
	int updateCommylog(Commylog obj);
	
	int preUpdateCommylogByAdmin(Commylog obj);
	
	int updateCommylogByAdmin(Commylog obj);
	
	Commylog getCommylog(String id);
	
	List<Commylog> listCommylog(@Param("query") CommylogQuery query);
	
	List<Commylog> listCommylogByAdmin(@Param("query") CommylogQuery query);
	
	void updateCommylogByID(Commylog obj);
	
	Commylog getUserInfo(@Param("userID")String userID);
	/**
	 * 查询机构下用户
	 * @param query
	 * @return
	 */
	List<Commylog> findOrgUser(@Param("query") CommylogQuery query);
	List<StatisticsCommylogBean> statisticsTxl(@Param("query") StatisticsCommylogQuery query);
	List<StatisticsCommylogBean> statisticsTxlZB(@Param("query") StatisticsCommylogQuery query);
	List<StatisticsCommylogBean> statisticsSyl(@Param("query") StatisticsCommylogQuery query);
	List<StatisticsCommylogBean> statisticsSylZB(@Param("query") StatisticsCommylogQuery query);
	/**
	 * 查询下一级组织日志数量
	 * @date 2018年12月12日 下午4:41:28 
	 * @author hanxiangyu
	 * @param query
	 * @return
	 */
	List<StatisticsCommylogBean> findOrgCommylogNum(@Param("query") StatisticsCommylogQuery query);
}